package com.biqee.dao.impl;

import com.biqee.dao.TbShopDAO;
import com.biqee.dao.base.BaseDAOImpl;
import com.biqee.model.db.TbShop;

public class TbShopDAOImpl extends BaseDAOImpl implements TbShopDAO {

	@Override
	public Integer create(TbShop tbShop) {
		if(tbShop == null) {
			throw new RuntimeException("tbShop should not be null");
		}
		
		return (Integer)getSqlMapClientTemplate().insert(getRealSqlId("create"), tbShop);
	}

	@Override
	public int update(TbShop tbShop) {
		return getSqlMapClientTemplate().update(getRealSqlId("update"), tbShop);
	}

	@Override
	public TbShop readByTbShopId(String tbShopId) {
		return (TbShop)getSqlMapClientTemplate().queryForObject(getRealSqlId("readByTbShopId"), tbShopId);
	}


}